package com.example.demo;

import android.os.Parcel;
import android.os.Parcelable;


public class Account implements Parcelable{
    private String phone;
    private String pwd;
    private String idNum;
    private String address;


    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getIdNum() {
        return idNum;
    }

    public void setIdNum(String idNum) {
        this.idNum = idNum;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public static Creator<Account> getCREATOR() {
        return CREATOR;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.phone);
        dest.writeString(this.pwd);
        dest.writeString(this.idNum);
        dest.writeString(this.address);
    }

    public void readFromParcel(Parcel source) {
        this.phone = source.readString();
        this.pwd = source.readString();
        this.idNum = source.readString();
        this.address = source.readString();
    }

    public Account() {
    }

    protected Account(Parcel in) {
        this.phone = in.readString();
        this.pwd = in.readString();
        this.idNum = in.readString();
        this.address = in.readString();
    }

    public static final Creator<Account> CREATOR = new Creator<Account>() {
        @Override
        public Account createFromParcel(Parcel source) {
            return new Account(source);
        }

        @Override
        public Account[] newArray(int size) {
            return new Account[size];
        }
    };

}
